package com.untour.im.server.handler;

import com.alibaba.fastjson2.JSON;
import com.untour.im.codec.protocol.packet.request.body.MessageRequestPacketData;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MessageRequestHandler extends SimpleChannelInboundHandler<MessageRequestPacketData>{
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MessageRequestPacketData msg) throws Exception {
        log.info("接受到客户端发送的消息：{}", JSON.toJSONString(msg));
    }
}
